package com.spring.boot.test.config.stragegy;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public enum TableFieldEnum {
    PAY_NO("pay_no","支付单号"),
    BUSINESS_NO("business_no","业务单号"),
    ;
    private String fieldName;
    private String desc;

    public static TableFieldEnum getByFieldName(String fieldName) {
        for (TableFieldEnum value : values()) {
            if(value.getFieldName().equals(fieldName)) return value;
        }
        return null;
    }
}
